package org.hqs.feign.clients;

import org.hqs.feign.common.JsonResult;
import org.hqs.feign.pojo.Doctor;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "doctorservice")

public interface DoctorClient {
    @GetMapping("/doctor/{orderId}")
    public JsonResult<Doctor> queryDoctorById(@PathVariable("orderId") Long orderId);

    @GetMapping("/doctor/all")
    public JsonResult<List<Doctor>> findAllDoctors();

    @PostMapping("/doctor/add")
    public JsonResult addDoctor(@RequestBody Doctor doctor);

    @PutMapping("/doctor/update")
    public JsonResult updateDoctor(@RequestBody Doctor doctor);

    @DeleteMapping("/doctor/delete")
    public JsonResult deleteDoctor(@RequestBody Doctor doctor);
}
